@greyColor: #fafafa;
@vPadding: 25px;
@hPadding: 20px;
@leftWidth: 252px;
@mainColor: #1890ff;
@navItemBackgroundColor: rgb(24 144 255 / 7.5%);
@moduleCanvasWidth: 400px;
@moduleCanvasHeight: 600px;
@mainCanvasColor: #f5f6fa;

#editor {
  display: flex;
  height: 100vh;
  flex-direction: column;
}

#editor-top {
  position: relative;
  z-index: 9999;
  height: 50px;
  box-shadow: 0 2px 10px 2px rgb(0 0 0 / 8%);
}

#editor-main {
  display: flex;
  height: calc(100% - 50px);
}

#editor-module-nav {
  width: @leftWidth;
  flex-grow: 0;
  flex-shrink: 0;

  :global {
    .ant-tabs {
      height: 100%;

      .ant-tabs-nav {
        background-color: @greyColor;

        .ant-tabs-nav-list {
          padding-top: @vPadding;

          .ant-tabs-tab {
            padding: 0 15px;
          }
        }
      }

      .ant-tabs-content-holder {
        .ant-tabs-content {
          height: 100%;

          .ant-tabs-tabpane {
            padding: 0;
          }

          /* 导航栏渲染 内容 start */
          .nav-pane {
            height: 100%;
            padding: @vPadding @hPadding;

            .nav-pane-title {
              margin-bottom: 12px;
              font-weight: bold;
            }

            .nav-item-container {
              display: flex;
              flex-wrap: wrap;

              .nav-item {
                display: flex;
                width: 70px;
                height: 60px;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                margin: 0 12px 12px 0;
                background: @navItemBackgroundColor;
                border-radius: 2px;
                cursor: pointer;
                font-size: small;

                &:nth-child(2n) {
                  margin-right: 0;
                }

                &:hover {
                  background-color: @mainColor;
                  color: #fff;
                }

                .nav-item-text {
                  margin-top: 4px;
                }

                .nav-item-icon {
                  min-height: 18px;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  flex-direction: column;
                }

                svg {
                  margin-top: 4px;
                }
              }
            }
          }

          /* 导航栏渲染 内容 end */
        }
      }
    }
  }
}

#editor-module-canvas {
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  background-color: @mainCanvasColor;

  :global {
    .editor-module-canvas-inner {
      display: flex;
      height: 100%;
      align-items: center;
      justify-content: center;

      .module-canvas {
        position: relative;
        width: @moduleCanvasWidth;
        height: @moduleCanvasHeight;
        flex-shrink: 0;
        margin: 0 auto;
        background-color: #fff;
      }
    }

    .axis-ruler-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }
}

#editor-module-style {
  width: @leftWidth;
  height: 100%;
  flex-grow: 0;
  flex-shrink: 0;

  :global {
    .editor-module-style-nav.ant-tabs  {
      height: 100%;

      .ant-tabs-nav {
        margin-bottom: 0;

        .ant-tabs-nav-list {
          display: flex;
          width: 100%;

          .ant-tabs-tab {
            flex-grow: 1;
            justify-content: center;
            text-align: center;

            .ant-tabs-tab-btn {
              display: flex;
              align-items: center;
            }

            & + .ant-tabs-tab {
              margin: 0;
            }
          }
        }
      }

      .ant-tabs-content-holder {
        overflow: auto;
      }
    }

    .ant-card {
      .ant-card-head {
        padding: 12px 16px;

        .ant-card-head-title {
          padding: 0;
        }
      }

      .ant-card-body {
        padding: 12px 16px;
        background-color: @mainCanvasColor;
      }
    }
  }
}

#editor-header {
  display: flex;
  padding: 10px 0;

  :global {
    .left-option {
      width: @leftWidth;
    }

    .center-option {
      display: flex;
      flex-grow: 1;
      justify-content: center;

      .align-svg {
        margin: 0 15px;
        cursor: pointer;

        &:hover {
          color: @mainColor;
        }
      }
    }

    .right-option {
      width: @leftWidth;
    }
  }
}
